<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%--
  Created by IntelliJ IDEA.
  User: 武露斌
  Date: 2021/10/15
  Time: 9:24
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
    <script src="../../js/jquery-1.8.2.min.js"></script>
    <script src="../../js/fileupload.js"></script>
    <link rel="stylesheet" href="../../css/css.css">
    <link rel="stylesheet" href="../../css/img.css">
</head>
<body>


<form action="list.do" method="post">
    <input type="hidden" name="pageNum">
    房主姓名：<input type="text" name="name" value="${map.name}">
    房产坐落地址<input type="text" name="address" value="${map.address}">
    <input type="submit" value="查询">
    <input type="button" value="刷新" onclick="sx()">
</form>

<table>
    <tr>
        <td>房产编号</td>
        <td>房主姓名</td>
        <td>坐落地址</td>
        <td>用途</td>
        <td>面积</td>
    </tr>
    <c:forEach items="${pageInfo.list}" var="a">
        <tr>
            <td>${a.hid}</td>
            <td>${a.namee}</td>
            <td>${a.address}</td>
            <td>${a.huse}</td>
            <td>${a.area}</td>
        </tr>
    </c:forEach>

    <tr>
        <td colspan="20">
            第${pageInfo.pageNum}/${pageInfo.pages}页
            <input type="button" value="首页" onclick="fy(1)">
            <input type="button" value="上一页" onclick="fy(${pageInfo.isFirstPage?1:pageInfo.prePage})">
            <input type="button" value="下一页" onclick="fy(${pageInfo.isLastPage?pageInfo.pages:pageInfo.nextPage})">
            <input type="button" value="尾页" onclick="fy(${pageInfo.pages})">
        </td>
    </tr>
</table>

</body>
</html>

<script>

    function fy(pageNum) {
        $("[name='pageNum']").val(pageNum)
        $("form").submit();
    }
    function sx() {
        location="list.do";
    }

</script>



















